-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop entry file for Linux app launchers #295 #3351
Conversation
Refs <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html> PR #3351 <#3351> Replaces PR #296 <#296> Fixes #295 <#295> Fixes #748 <#748> Fixes #1636 <#1636> Co-authored-by: Chih-Hsuan Yen <[email protected]> Signed-off-by: Romain Vimont <[email protected]>
Make Exec= compatible with $PATH configured in .bashrc/ or .zshrc/… PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <[email protected]>
Hi, Thank you 👍 I added a first commit to replace the hardcoded Then I added a The resulting branch is here: Please review and test 😉 |
Awesome improvements! Just one minor suggestion -
"or" indeed makes it clearer, but a slash after .bashrc is somewhat unusual. Probably better with
(Term "shell startup scripts" is just the first one out of my head. Different people use different terms for those files :D)
|
Refs <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html> PR #3351 <#3351> Replaces PR #296 <#296> Fixes #295 <#295> Fixes #748 <#748> Fixes #1636 <#1636> Co-authored-by: Chih-Hsuan Yen <[email protected]> Signed-off-by: Romain Vimont <[email protected]>
Make Exec= compatible with $PATH configured in .bashrc/ or .zshrc/… PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <[email protected]>
In
So "shell startup script" looks good to me.
I suggest: +# For some users, the PATH or ADB environment variables are set from the shell
+# startup file, like .bashrc or .zshrc… Run an interactive shell to get
+# environment correctly initialized. What do you think? See
😞
OK |
Looks great, thank you very much for the efforts! |
@asnelling as the author of #296, any remark? |
app/scrcpy.desktop
Outdated
# For some users, `adb` is not in default $PATH but the one configured in .bashrc/.zshrc/... | ||
# Run an interactive shell to get the same path used in terminals. | ||
Exec=/bin/sh -c '"$SHELL" -i -c scrcpy' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For system-wide installations, Exec should use the system-wide adb
installed at, e.g.: /usr/bin/adb
and leave customization concerns up to the user in e.g.: ~/.local/applications/scrcpy.desktop
👍 good to merge
IMO, $ grep '^Exec=' /usr/share/applications/*.desktop More importantly, merge it 👍 |
It's up to whether rom1v wants to support
It's also possible to extract those "complex" Exec= lines to standalone scripts like |
So, for the non-console version:
For the console version:
? Where should the user define @yangfl any opinion about the content of |
Strange, but acceptable as long as the software author satisfies with it. |
Yeah,
I checked and found that qterminal and similar programs expand environment variables. I'm not sure if other terminal emulators do that or not.
That depends on how an X11 or Wayland session is started. Apparently there is no universal way - see https://wiki.archlinux.org/title/Environment_variables#Graphical_environment |
OK. But then the scrcpy-console version will load environment variables from .bashrc (whatever the default shell), while the non-console version will not.
OK, so maybe I will keep Thank you. |
Yeah that's an issue. How about |
Refs <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html> PR #3351 <#3351> Replaces PR #296 <#296> Fixes #295 <#295> Fixes #748 <#748> Fixes #1636 <#1636> Co-authored-by: Addison Snelling <[email protected]> Co-authored-by: Chih-Hsuan Yen <[email protected]> Co-authored-by: Romain Vimont <[email protected]> Signed-off-by: Romain Vimont <[email protected]>
Make Exec= compatible with $PATH configured in .bashrc/ or .zshrc/… PR #3351 <#3351> Refs #296 <#296 (comment)> Co-authored-by: Romain Vimont <[email protected]> Signed-off-by: Romain Vimont <[email protected]>
Assuming no objection for this approach, I imported pr3351.2 branch, added proposed bash arguments and force-updated this PR. |
Refs <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html> PR #3351 <#3351> Replaces PR #296 <#296> Fixes #295 <#295> Fixes #748 <#748> Fixes #1636 <#1636> Co-authored-by: Chih-Hsuan Yen <[email protected]> Signed-off-by: Romain Vimont <[email protected]>
Make Exec= compatible with $PATH configured in .bashrc or .zshrc… PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <[email protected]>
Refs <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html> PR #3351 <#3351> Replaces PR #296 <#296> Fixes #295 <#295> Fixes #748 <#748> Fixes #1636 <#1636> Co-authored-by: Chih-Hsuan Yen <[email protected]> Signed-off-by: Romain Vimont <[email protected]>
Make Exec= compatible with $PATH configured in .bashrc or .zshrc… PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <[email protected]>
Merged into |
Thanks! |
See: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
Seems #296 is stale, so I created a replacement with fixes. Differences from the previous pull request are in the second commit.